export const mutations = {
  // SET_SINGER:(state,val)=>{
  //   state.singer = val
  // }
  /**
   * 设置侧边菜单栏目的折叠
   * @param {Object} state
   * @param {Boolean} value 是否折叠
   */
  SET_IS_COLLAPSE: (state, val) => {
    state.isCollapse = val
  },
  /**
   * 重置缓存项
   * @param {Object} state
   * @param {string} val
   */
  RESET_ADD_KEEP_LIVE_INCLUDE: (state, val) => {
    state.keepLiveInclude = val;
  },
  /**
   * 添加缓存项
   * @param {Object} state
   * @param {string} val
   */
  ADD_ADD_KEEP_LIVE_INCLUDE: (state, val) => {
    state.keepLiveInclude.push(val);
  },
  /**
   * 删除缓存项
   * @param {Object} state
   * @param {index} index
   */
  DEL_ADD_KEEP_LIVE_INCLUDE(state, index) {
    state.keepLiveInclude.splice(index, 1);
  },
  /**
   * tabs超出后的左右箭头是否显示
   * @param state
   * @param val
   * @constructor
   */
  SET_OVERFLOW_TABS(state, val) {
    state.isOverFlow = val;
  },
  /**
   * tabs由侧边栏给
   * @param state
   * @param val
   * @constructor
   */
  SET_TABS(state, val) {
    state.tabs = val;
  }


}


/**
 *
 * methods: {
    ...mapMutations([
      'increment', // 将 `this.increment()` 映射为 `this.$store.commit('increment')`

      // `mapMutations` 也支持载荷：
      'incrementBy' // 将 `this.incrementBy(amount)` 映射为 `this.$store.commit('incrementBy', amount)`
    ]),
    ...mapMutations({
      add: 'increment' // 将 `this.add()` 映射为 `this.$store.commit('increment')`
    })
  }
 *
 *
 */
